package cn.bootx.table.modify.mysql.index;

import cn.bootx.table.modify.annotation.DbColumn;
import cn.bootx.table.modify.annotation.DbTable;
import cn.bootx.table.modify.mysql.annotation.DbMySqlIndex;
import cn.bootx.table.modify.mysql.constants.MySqlIndexType;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.experimental.FieldNameConstants;

import static cn.bootx.table.modify.mysql.index.BaseIndexUpdateEntity.Fields.*;

/**
 * 复杂索引配置更新
 * @author xxm
 * @date 2023/6/5
 */
// 普通索引 字段名称方式
@DbMySqlIndex(fields = dbIndex1,comment = "普通索引-实体类字段",name = "db_index1_field")
// 全文索引
@DbMySqlIndex(fields = index4,type = MySqlIndexType.NORMAL)
@DbMySqlIndex(type = MySqlIndexType.UNIQUE,fields = index3,comment = "唯一索引")
@DbTable(name = "base_index_entity",comment = "复杂索引配置更新")
@FieldNameConstants
public class BaseIndexUpdateEntity {
    private String dbIndex1;

    private String index2;

    @DbColumn("index_3")
    private Long index3;

    @TableField("index_4")
    private String index4;
}
